﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class analyze_new_excel : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string filename = DateTime.Now.ToString("yyyy-MM-dd_HHmmss") + ".xls";

        Response.ContentType = "application/vnd.ms-excel";
        Response.ContentType = "application/x-msexcel";
        Response.AddHeader("Content-Disposition", "attachment;filename=" + filename);

        Response.Write("<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />");
        Response.Write(Request.Form["word_excel"].Replace("<TABLE ", "<TABLE border=1 "));
        Response.End();
    }
}
